<%@ Page Language="C#" MasterPageFile="~/TopLevel.master" AutoEventWireup="true"
    CodeFile="ProductDetails.aspx.cs" Inherits="ProductDetails" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="pageContent" runat="Server">
    <asp:DataList ID="DataList1" runat="server" DataSourceID="dsProductDetails" ForeColor="#0E0E6C">
        <FooterStyle ForeColor="#0E0E6C" />
        <ItemTemplate>
            Name:
            <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>'></asp:Label><br />
            Color:
            <asp:Label ID="ColorLabel" runat="server" Text='<%# Eval("Color") %>'></asp:Label><br />
            Price:
            <asp:Label ID="ListPriceLabel" runat="server" Text='<%# Eval("ListPrice") %>'></asp:Label><br />
            Photo: <a style="color: #0e0e6c" target="_blank" href='<%# "readImage.aspx?Size=Large&ProductID=" + Eval("ProductID") %>'>
                <img runat="server" src='<%# "readImage.aspx?Size=ThumbNail&ProductID=" + Eval("ProductID") %>' id="imgThumbnail" />&nbsp;[Click to enlarge]</a>
            <br />
        </ItemTemplate>
        <HeaderStyle ForeColor="#0E0E6C" />
    </asp:DataList>
    <asp:SqlDataSource ID="dsProductDetails" runat="server" ConnectionString="<%$ ConnectionStrings:AdvWorks %>"
        SelectCommand="SELECT Production.Product.ProductID, Production.Product.Name, Production.Product.Color, Production.Product.ListPrice FROM Production.Product WHERE (Production.Product.ProductID=@ProductID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ProductID" QueryStringField="ProductID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
